package com.sise.cn.api.exception;

import com.sise.cn.api.enumerate.ServerResponseEnum;
import lombok.Getter;

/**
 * 基础异常类
 *
 * @author 龚秀峰
 * @date 2019-10-18
 */

public abstract class BaseBusinessException extends RuntimeException {

    @Getter
    private final ServerResponseEnum responseEnum;

    /**
     *
     * @param responseCodeEnum 统一响应枚举对象，包括各种情况的枚举
     */
    public BaseBusinessException(ServerResponseEnum responseCodeEnum) {
        super(responseCodeEnum.getMessage());
        this.responseEnum = responseCodeEnum;
    }


}
